package com.muyonghui.myjavaweb.model;

import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;

/**
 * Created by muyonghui on 2017/4/17.
 */
@Component("ValidUserBean")
public class ValidUserBean {

    private int id;

    @NotNull(message = "用户名不能为空")
    private String name;

    @NotNull(message = "年龄不能为空")
    private Integer age;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
